﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Sinc.ERP.Application;

/// <summary>
/// 库存调拨基础输入参数
/// </summary>
public class TransferOrderBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }

    /// <summary>
    /// 产品Id
    /// </summary>
    [Required(ErrorMessage = "产品Id不能为空")]
    public virtual long? ProductId { get; set; }

    /// <summary>
    /// 调拨数量
    /// </summary>
    [Required(ErrorMessage = "调拨数量不能为空")]
    public virtual int? Qty { get; set; }

    /// <summary>
    /// 来源客户Id
    /// </summary>
    [Required(ErrorMessage = "来源客户Id不能为空")]
    public virtual long? FromCustomerId { get; set; }

    /// <summary>
    /// 目标客户Id
    /// </summary>
    [Required(ErrorMessage = "目标客户Id不能为空")]
    public virtual long? ToCustomerId { get; set; }

}

/// <summary>
/// 库存调拨分页查询输入参数
/// </summary>
public class PageTransferOrderInput : BasePageInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string Code { get; set; }
    /// <summary>
    /// 产品Id
    /// </summary>
    public long? ProductId { get; set; }

    /// <summary>
    /// 调拨数量
    /// </summary>
    public int? Qty { get; set; }

    /// <summary>
    /// 来源客户Id
    /// </summary>
    public long? FromCustomerId { get; set; }

    /// <summary>
    /// 目标客户Id
    /// </summary>
    public long? ToCustomerId { get; set; }

    /// <summary>
    /// 选中主键列表
    /// </summary>
    public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 库存调拨增加输入参数
/// </summary>
public class AddTransferOrderInput
{
    /// <summary>
    /// 产品Id
    /// </summary>
    [Required(ErrorMessage = "产品Id不能为空")]
    public long? ProductId { get; set; }

    /// <summary>
    /// 调拨数量
    /// </summary>
    [Required(ErrorMessage = "调拨数量不能为空")]
    public int? Qty { get; set; }

    /// <summary>
    /// 来源客户Id
    /// </summary>
    [Required(ErrorMessage = "来源客户Id不能为空")]
    public long? FromCustomerId { get; set; }

    /// <summary>
    /// 目标客户Id
    /// </summary>
    [Required(ErrorMessage = "目标客户Id不能为空")]
    public long? ToCustomerId { get; set; }

}

/// <summary>
/// 库存调拨删除输入参数
/// </summary>
public class DeleteTransferOrderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
}

/// <summary>
/// 库存调拨更新输入参数
/// </summary>
public class UpdateTransferOrderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }

    /// <summary>
    /// 产品Id
    /// </summary>    
    [Required(ErrorMessage = "产品Id不能为空")]
    public long? ProductId { get; set; }

    /// <summary>
    /// 调拨数量
    /// </summary>    
    [Required(ErrorMessage = "调拨数量不能为空")]
    public int? Qty { get; set; }

    /// <summary>
    /// 来源客户Id
    /// </summary>    
    [Required(ErrorMessage = "来源客户Id不能为空")]
    public long? FromCustomerId { get; set; }

    /// <summary>
    /// 目标客户Id
    /// </summary>    
    [Required(ErrorMessage = "目标客户Id不能为空")]
    public long? ToCustomerId { get; set; }
}

/// <summary>
/// 修改调拨单备注输入参数
/// </summary>
public class UpdateTransferOrderRemarkInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}

/// <summary>
/// 库存调拨主键查询输入参数
/// </summary>
public class QueryByIdTransferOrderInput : DeleteTransferOrderInput
{
}

/// <summary>
/// 库存调拨数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportTransferOrderInput : BaseImportInput
{
    /// <summary>
    /// 产品Id
    /// </summary>
    [ImporterHeader(Name = "*产品Id")]
    [ExporterHeader("*产品Id", Format = "", Width = 25, IsBold = true)]
    public long? ProductId { get; set; }

    /// <summary>
    /// 调拨数量
    /// </summary>
    [ImporterHeader(Name = "*调拨数量")]
    [ExporterHeader("*调拨数量", Format = "", Width = 25, IsBold = true)]
    public int? Qty { get; set; }

    /// <summary>
    /// 来源客户Id
    /// </summary>
    [ImporterHeader(Name = "*来源客户Id")]
    [ExporterHeader("*来源客户Id", Format = "", Width = 25, IsBold = true)]
    public long? FromCustomerId { get; set; }

    /// <summary>
    /// 目标客户Id
    /// </summary>
    [ImporterHeader(Name = "*目标客户Id")]
    [ExporterHeader("*目标客户Id", Format = "", Width = 25, IsBold = true)]
    public long? ToCustomerId { get; set; }

}
